<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>题目列表 - Online Judge</title>
    <style>
        /* 基础设置，重置默认样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background-color: #f4f4f9;
            color: #333;
            line-height: 1.6;
        }

        /* 容器样式 */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        /* 导航栏样式 */
        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #2c3e50;
            padding: 15px;
        }

        .navbar a {
            color: #ecf0f1;
            text-decoration: none;
            padding: 10px 15px;
            font-size: 18px;
            transition: background 0.3s ease;
        }

        .navbar a:hover {
            background-color: #34495e;
        }

        .navbar .login {
            background-color: #e74c3c;
            border-radius: 5px;
            padding: 10px 20px;
        }

        .navbar .login:hover {
            background-color: #c0392b;
        }

        /* 主体部分样式 */
        .question_list {
            margin-top: 40px;
        }

        .question_list h1 {
            text-align: center;
            font-size: 2.5rem;
            color: #2980b9;
            margin-bottom: 20px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        th, td {
            padding: 15px;
            text-align: left;
        }

        th {
            background-color: #2980b9;
            color: white;
            font-size: 1.2rem;
        }

        td {
            background-color: #ecf0f1;
            font-size: 1rem;
            border-bottom: 1px solid #bdc3c7;
        }

        tr:hover td {
            background-color: #dcdde1;
        }

        .item a {
            color: #2980b9;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .item a:hover {
            color: #c0392b;
        }

        /* 底部样式 */
        .footer {
            margin-top: 40px;
            text-align: center;
            color: #7f8c8d;
            padding: 10px;
        }

        .footer h4 {
            font-size: 1rem;
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 导航栏 -->
        <div class="navbar">
            <div>
                <a href="/">首页</a>
                <a href="/all_questions">更多题目列表</a>
                <a href="#">竞赛区</a>
                <a href="#">讨论区</a>
            </div>
            <a class="login" href="#">登录</a>
        </div>

        <!-- 题目列表 -->
        <div class="question_list">
            <h1>在线题库 - 题目列表</h1>
            <table>
                <tr>
                    <th>编号</th>
                    <th>标题</th>
                    <th>难度</th>
                </tr>
                {{#question_list}}
                <tr>
                    <td class="item">{{number}}</td>
                    <td class="item"><a href="/question/{{number}}">{{title}}</a></td>
                    <td class="item">{{star}}</td>
                </tr>
                {{/question_list}}
            </table>
        </div>

        <!-- 底部 -->
        <div class="footer">
            <h4>&copy; 2024 Online Judge</h4>
        </div>
    </div>
</body>

</html>
